package io.gitee.twoke.generator.spring.boot;

import io.gitee.twoke.generator.engine.GenerateEngine;
import io.gitee.twoke.generator.engine.GenerateService;
import io.gitee.twoke.generator.engine.MetaDataService;
import io.gitee.twoke.generator.engine.TemplateService;
import io.gitee.twoke.generator.engine.impl.generate.method.GlobalMethodManager;
import io.gitee.twoke.generator.engine.impl.generate.parameter.ParameterLoaderManager;
import io.gitee.twoke.generator.spring.GenerateEngineFactoryBean;
import io.gitee.twoke.generator.spring.SpringGenerateEngineConfiguration;

public abstract class AbstractGenerateEngineConfiguration {
	
  public GenerateEngineFactoryBean springProcessEngineBean(SpringGenerateEngineConfiguration configuration) {
    GenerateEngineFactoryBean generateEngineFactoryBean = new GenerateEngineFactoryBean();
    generateEngineFactoryBean.setGenerateEngineConfiguration(configuration);
    return generateEngineFactoryBean;
  }

  public MetaDataService metaDataService(GenerateEngine generateEngine) {
    return generateEngine.getMetaDataService();
  }

  public TemplateService templateService(GenerateEngine generateEngine) {
    return generateEngine.getTemplateService();
  }

  public GenerateService generateService(GenerateEngine generateEngine) {
    return generateEngine.getGenerateService();
  }

  public GlobalMethodManager globalMethodManager(GenerateEngine generateEngine) {
    return generateEngine.getGlobalMethodManager();
  }

  public ParameterLoaderManager parameterLoaderManager(GenerateEngine generateEngine) {
    return generateEngine.getParameterLoaderManager();
  }

}